<?php

/**
 * @name ErrorController
 * @desc   错误控制器, 在发生未捕获的异常时刻被调用
 * @see    http://www.php.net/manual/en/yaf-dispatcher.catchexception.php
 * @author root
 */
class ErrorController extends Yaf_Controller_Abstract
{
    //从2.1开始, errorAction支持直接通过参数获取异常
    public function errorAction($exception)
    {
        $error_code = $exception->getCode();
        $error_message = $exception->getMessage();
        echo $error_code." ".$error_message;
        Func_Log::write("logs", "error", $error_code . " : " . $error_message);
    }

    public function authAction()
    {

    }
    public function serverAction()
    {

    }
}
